<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>${param.pageTitle }</title>
		<jsp:include page="../../../inc/js.jsp"></jsp:include>
		<jsp:include page="../../../inc/css.jsp"></jsp:include>
		<script type="text/javascript">
function movePage(pageNo){
	window.location='?pageNo='+pageNo+param()+'&pageTitle=${param.pageTitle }';
}
function param(){
	var param="";
if($("#classCode").val()!="")
		param+='&classCode='+$("#classCode").val();
	if($("#title").val()!="")
		param+='&title='+$("#title").val();
	if($("#description").val()!="")
		param+='&description='+$("#description").val();
	return param;
}
	$(document).ready(function() {
		$.get("getSelect.do",{type:'ms',index:'${param.classCode}',code:null}, function(data){$("select#classCode").append(data);});
		$("#search").button().click(function() {
			movePage(1);
		});
		$("#add").button().click(function() {
			window.open('addMsg.do', '', '');
		});
	});
</script>
	</head>
	<body>
		<jsp:include page="../../../head.jsp"></jsp:include>
		<div class="container">
			<div class="header"></div>
			<div class="mainContent">
				<div class="content">
					<div class="list">
						<div class="search">
							<label>
								类别：
							</label>
							<select id="classCode">
								<option value="">
									不限制
								</option>
							</select>
							<label>
								标题：
							</label>
							<input type="text" name="title" id="title"
								value="${param.title }" />
							<label>
								内容：
							</label>
							<input type="text" name="description" id="description"
								value="${param.description }" />
							<button id="search">查询</button>
							<button id="add">发布</button>
						</div>

						<ul>
							<c:forEach var="e" items="${o.dataList}" varStatus="s">
								<li>
									<a href="?pageTitle=${param.pageTitle }&classCode=${e.classCode}">【${e.className}】</a>
									<a href="showMsg.do?id=${e.id}" target="_blank">${e.title }</a>
									<span class="date"><fmt:formatDate value="${e.inputdate}" pattern="yyyy/MM/dd" /></span>
								</li>
							</c:forEach>

						</ul>
						${o.pageNav }
					</div>
				</div>
				<div class="sidebar"><jsp:include page="../../../advRight.jsp"></jsp:include></div>
			</div>
			<div class="footer"><jsp:include page="../../../foot.jsp"></jsp:include></div>
		</div>

	</body>
</html>